<?php
class M_proses_pengaduan_saran extends arfaModel{
	
	function __construct() 
	{
        parent::__construct();
		$this->table_name	= "proses_pengaduan_saran";
		$this->primary_key	= "KD_PROSES";
		$this->order_by		= "KD_PROSES ASC";
    }
	
	function get_all($id)
	{
		$this->db->select('*');
		$this->db->from($this->table_name);
		$this->db->where("KD_PENGADUAN_SARAN",$id);
		$this->db->order_by("KD_PROSES","DESC");
		$query = $this->db->get();
		
		return $query->result_array();
	}
	
	function get_proses($id)
	{
		$this->db->select("*");
		$this->db->from($this->table_name);
		$this->db->where("KD_PENGADUAN_SARAN", $id);
		$this->db->where("TESTIMONI", 0);
		$query = $this->db->get();
		
		return $query->result_array();
	}
	
	function get_verifikasi($id)
	{
		$this->db->select("*");
		$this->db->from($this->table_name);
		$this->db->where("KD_PENGADUAN_SARAN", $id);
		$this->db->where("TESTIMONI", 1);
		$query = $this->db->get();
		
		return $query->result_array();
	}
}